﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using OgilvyOne.Model;

namespace OgilvyOne.IDAL
{
    public interface IMemberInfo
    {
        /// <summary>
        /// 添加会员
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int Add(MemberInfoModel model);
        /// <summary>
        /// 修改基本资料
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool Update(MemberInfoModel model);
        /// <summary>
        /// 查询收藏列表
        /// </summary>
        /// <returns></returns>
        IList GetColl(int mid,int top);
        /// <summary>
        /// 修改登录时间
        /// </summary>
        /// <param name="logintime"></param>
        /// <returns></returns>
        bool UpdateLastLoginTime(int mid, DateTime logintime);
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="mid"></param>
        /// <param name="newpas"></param>
        /// <returns></returns>
        bool UpdatePassword(int mid, string newpas);
        /// <summary>
        /// 获得用户信息
        /// </summary>
        /// <param name="username"></param>
        /// <param name="userType">合作网站类型</param>
        /// <returns></returns>
        MemberInfoModel GetMemberInfoModel(string username, string userType);
        /// <summary>
        /// 获得用户信息
        /// </summary>
        /// <param name="username"></param>
        /// <param name="userType"></param>
        /// <returns></returns>
        MemberInfoModel GetMemberInfoModel(string username);
        /// <summary>
        /// 根据用户邮箱获取用户信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        MemberInfoModel GetMemberInfoModelEmail(string email);
        /// <summary>
        /// 用户名是否存在
        /// </summary>
        /// <param name="username"></param>
        /// <param name="userType">合作网站类型</param>
        /// <returns></returns>
        bool IsExists(string username, string userType);
        /// <summary>
        /// 用户名是否存在
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        bool IsExists(string username);
        /// <summary>
        /// 查询会员
        /// </summary>
        /// <param name="q"></param>
        /// <returns></returns>
        IList GetUserList(MemberInfoModel q);

        MemberInfoModel GetMemberInfoModel(int mid);
        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="mid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        bool UpdateState(int mid, int state);
        /// <summary>
        /// 删除会员及相关信息
        /// </summary>
        /// <returns></returns>
        bool Delete(int memberid);
        /// <summary>
        /// 修改头像
        /// </summary>
        /// <param name="mid"></param>
        /// <param name="userimg"></param>
        /// <returns></returns>
        bool UpdateUserImg(int mid, string userimg);
         /// <summary>
        /// 查询收藏列表
        /// </summary>
        /// <returns></returns>
        IList GetColl(int mid, string cid);
         /// <summary>
        /// 查询留言列表
        /// </summary>
        /// <returns></returns>
        IList GetComments(int mid,int top);
        IList GetComments(int mid,string auditstate);
        /// <summary>
        /// 查询留言总数
        /// </summary>
        /// <returns></returns>
        IList GetCount(int mid, string auditstate);
        /// <summary>
        /// 查询收藏总数
        /// </summary>
        /// <returns></returns>
        IList GetcollCount(int mid);
         /// <summary>
        /// 查询相册总数
        /// </summary>
        /// <returns></returns>
        IList GetTitbitsCount(int mid, string state);
        /// <summary>
        /// 查询相册列表
        /// </summary>
        /// <returns></returns>
        IList GetTitbits(int mid, string state);
         /// <summary>
        /// 查询照片列表
        /// </summary>
        /// <returns></returns>
        IList GetPhoto(int mid, string state, int aid);
        /// <summary>
        /// 获得我买优惠码
        /// </summary>
        /// <param name="memberid"></param>
        /// <returns></returns>
        string[] GetCoupon(int memberid);
        /// <summary>
        /// 发送不成功，更新状态
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        bool UpdateCopon(string code);
    }
}
